package com.ruoyi.webs.utils;

import org.springframework.util.DigestUtils;

public class MD5Util {
    public static String getMd5Password(String password, String salt, int times) {
        String str = String.valueOf(salt) + password + salt;

        for (int i = 0; i < times; i++) {

            str = DigestUtils.md5DigestAsHex(str.getBytes()).toUpperCase();
        }

        return str;
    }

    public static void main(String[] args) {
    }
}